package com.example.function.project.controller;

import com.example.common.support.AjaxResponse;
import com.example.common.support.CP_GlobalNamingConstant;
import com.example.common.support.CP_OperateLog;
import com.example.function.project.model.one.ProjectAssetsGroup;
import com.example.function.project.service.IProjectAssetsGroupService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import java.util.List;


/**
 * Description: <project模块controller >. <br>
 * <p>
 * <基本的crud>
 * </p>
 * generate time:2021-7-27 16:02:33
 *
 * @author hanqf
 * @version V1.0
 */

@RestController
@Slf4j
@RequestMapping("/project")
public class ProjectAssetsGroupController {


    @Resource(name = "projectAssetsGroupService")
    protected IProjectAssetsGroupService projectAssetsGroupService;


    /**
     * 查询全部.
     *
     * @return AjaxResponse
     */
    @RequestMapping(value = "/projectAssetsGroups")
    @CP_OperateLog(value = "查询全部项目资产统计", type = CP_GlobalNamingConstant.OPERATE_LIST)
    public AjaxResponse projectAssetsGroups() {
        final List<ProjectAssetsGroup> projectAssetsGroupList = projectAssetsGroupService.findAll();
        return AjaxResponse.success(projectAssetsGroupList);
    }


}

